構築、破棄、コピー
空のコンテナー・コンストラクター
concurrent_vector(); explicit concurrent_vector( const allocator_type& alloc );空の
concurrent_vectorを構築。利用可能であれば、アロケーター
allocを使用してメモリーを割り当てます。
要素のシーケンスから構築
explicit concurrent_vector( size_type count, const value_type& value, const allocator_type& alloc = allocator_type() );
allocを使用して、count個のvalueのコピーを含むconcurrent_vectorを構築します。
explicit concurrent_vector( size_type count, const allocator_type& alloc = allocator_type() );
allocを使用して、デフォルトで構築されたn個のインプレース要素を含むconcurrent_vectorを構築します。
template <typename InputIterator> concurrent_vector( InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type() );アロケーター
allocを使用して、半開区間[first, last)のすべての要素を含むconcurrent_vectorを構築します。要件:
InputIteratorタイプは、[input.iterators] ISO C++ 標準のInputIterator要件を満たしている必要があります。
concurrent_vector( std::initializer_list<value_type> init, const allocator_type& alloc = allocator_type() );
concurrent_vector(init.begin(), init.end(), alloc)と等価です。
コンストラクターをコピー
concurrent_vector( const concurrent_vector& other ); concurrent_vector( const concurrent_vector& other, const allocator_type& alloc );
otherのコピーを作成します。アロケーター引数が指定されていない場合、
std::allocator_traits<allocator_type>::select_on_container_copy_construction(other.get_allocator())を呼び出して取得できます。
otherとの同時操作が行われると動作は未定義です。
ムーブ・コンストラクター
concurrent_vector( concurrent_vector&& other ); concurrent_vector( concurrent_vector&& other, const allocator_type& alloc );ムーブ・セマンティクスを使用して、
otherの内容でconcurrent_vectorを作成します。
otherは有効のままですが、未指定の状態となります。アロケーター引数が指定されていない場合、
std::move(other.get_allocator())を呼び出して取得できます。
otherとの同時操作が行われると動作は未定義です。
デストラクター
~concurrent_vector();
concurrent_vectorを破棄します。ストアされた要素のデストラクターを呼び出してストレージの割り当てを解除します。
*thisとの同時操作が行われると動作は未定義です。
代入操作
concurrent_vector& operator=( const concurrent_vector& other );
*thisのすべての要素をotherの要素をコピーして置き換えます。
std::allocator_traits<allocator_type>::propagate_on_container_copy_assignment::valueがtrueの場合、アロケーターのコピーを割り当てます。
*thisとotherの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照。
concurrent_vector& operator=( concurrent_vector&& other ) noexcept(/*See below*/);
*thisのすべての要素を、ムーブ・セマンティクスによってotherの要素で置き換えます。
otherは有効のままですが、未指定の状態となります。
std::allocator_traits<allocator_type>::propagate_on_container_move_assignment::valueがtrueの場合、アロケーターの要素を移動して割り当てます。
*thisとotherの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照。例外: 具体的に
noexceptは以下です。noexcept(std::allocator_traits<allocator_type>::propagate_on_container_move_assignment::value || std::allocator_traits<allocator_type>::is_always_equal::value)
concurrent_vector& operator=( std::initializer_list<value_type> init );
*thisのすべての要素をinitの要素して置き換えます。
*thisとの同時操作が行われると動作は未定義です。戻り値:
*thisへの参照。
代入
void assign( size_type count, const value_type& value );
*thisのすべての要素をvalueの要素をコピーcountで置き換えます。
template <typename InputIterator> void assign( InputIterator first, InputIterator last );
*thisのすべての要素を半開区間[first, last)の要素で置き換えます。このオーバーロードは、
InputIteratorタイプが [input.iterators] ISO C++ 標準の InputIterator 要件を満たしている場合にのみオーバーロード解決に影響します。
void assign( std::initializer_list<value_type> init );
assign(init.begin(), init.end())と等価です。
get_allocator
allocator_type get_allocator() const;戻り値:
*thisに関連付けられているアロケーターのコピーを返します。
